import Cookies from 'js-cookie'

const TokenKey = 'app_token'

export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}

const userName = 'app_user_name'

export function getUserName() {
  return Cookies.get(userName)
}

export function setUserName(token) {
  return Cookies.set(userName, token)
}

export function removeUserName() {
  return Cookies.remove(userName)
}

const userId = 'app_user_id'

export function getUserId() {
  return Cookies.get(userId)
}

export function setUserId(token) {
  return Cookies.set(userId, token)
}

export function removeUserId() {
  return Cookies.remove(userId)
}
